{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "4ddcd67d-36ae-41e6-b70c-134ebbd81efa",
   "metadata": {},
   "source": [
    "Chapter 06\n",
    "# 加法\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0bfca160-0126-4006-8fcb-2a862f32fa04",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "30.0\n"
     ]
    }
   ],
   "source": [
    "# 数值加法\n",
    "a = 10    # 整数\n",
    "b = 20.0  # 浮点数\n",
    "c = a + b # 浮点数\n",
    "print(c)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8b3afba9-c268-4eae-b5d7-7a485caa9d76",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1020.0\n"
     ]
    }
   ],
   "source": [
    "# 字符串拼接\n",
    "str_a = \"10\"    # str(a)\n",
    "str_b = \"20.0\"  # str(b)\n",
    "str_c = str_a + str_b\n",
    "print(str_c)  "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
